The present invention relates to an endoscope apparatus, a method for controlling an endoscope apparatus and an information storage device.
A depth of field as deep as possible is required for an endoscope apparatus (endoscope system) so that the user can easily perform diagnosis and treatment. In recent years, an image sensor having a large number of pixels has been used for the endoscope system, and the depth of field of the endoscope system has become shallow. Therefore, an endoscope system that performs an autofocus (AF) process has been proposed. The following techniques have been proposed to prevent a situation in which the focus operation is unnecessarily performed when capturing a video (moving image).
JP-A-2006-208818 discloses a technique that stores the AF evaluation value (in-focus evaluation value) acquired when the focus operation has been completed, and performs the focus operation again when a change in the AF evaluation value that is equal to or larger than a given threshold value has continuously occurred for a time equal to or longer than a given standby time. This technique makes it possible to suppress a situation in which the focus operation is unnecessarily performed (i.e., the focus operation is performed too frequently).
JP-A-2010-176061 discloses a technique that sets the AF area in the center area of the image, and calculates the degree of similarity in the peripheral area between the current image and the previous image, and the degree of similarity in the center area (AF area) between the current image and the previous image. Note that the degree of similarity used in JP-A-2010-176061 decreases as the comparison target images are more similar to each other. According to the technique disclosed in JP-A-2010-176061, the focus operation is not performed when the degree of similarity in the peripheral area is equal to or larger than a given threshold value, and the degree of similarity in the center area is equal to or smaller than a given threshold value. According to the technique disclosed in JP-A-2010-176061, it is possible to suppress a situation in which the focus operation is unnecessarily performed even if the object captured within the peripheral area of the image has changed due to a change in framing or the like, as long as the distance to the main object situated in the center area of the image does not change.
The user of an endoscope system (particularly a surgical endoscope system) operates the endoscope so that a lesion is situated around the center of the image, and performs treatment (e.g., excision of a lesion or suture) using a treatment tool (e.g., electrosurgical knife or forceps). Therefore, it is desirable that the endoscope system be configured so that the AF area is situated around the center of the image. It is desirable to stop the focus operation after the user has fixed the field of view in order to perform treatment, and the focus operation controlled by the AF control process has been completed, in order to suppress or reduce the occurrence of defocus or the like due to an unintentional change in focus position or erroneous AF control.
Since the user performs treatment (e.g., excision or suture) on a lesion that is situated around the center of the image, a large motion of the treatment tool, or a change in position or shape of the lesion occurs around the center of the image during treatment. As a result, a similar image is not obtained in the center area (AF area) of the image, and the AF evaluation value changes to a large extent when the user performs treatment.